Using Condition Editors
- Wait conditions with the Wait for Entry Change activity or the Routing activities. These conditions must be satisfied before an entry will proceed to the next activity in the workflow.
- Decision conditions to configure if a series of activities inside a flow control activity will run (e.g., the Repeat activity's Repeat condition).
- Starting rule conditions to define when a workflow or business process will be performed.
- Business process requirements to specify when a business process will be allowed to be started by users in the Laserfiche client applications.
See a video about using condition editors
Creating a condition
In a condition editor, conditions are assigned through a series of nested menu options that start broad and become more specific. Click any underlined text in the condition editor for more options.
- Group: Click this link to choose if all the conditions in the group must be true, if any of the conditions must be true, if any of the conditions must be false, or if all the conditions must be false.
- Condition Type: Click these links to specify what type of entry, user, repository, or token the condition will concern. Point to some of the items in the menu to see more options, which can help you specify exactly which entries or tokens you want the conditions to apply to. Learn more about the Condition Type options.
- Searching: If you are defining a condition that concerns fields, tags, or tokens, you can search within these categories to find the metadata or token you want. See how to search within a category.
- Operator: Click these links to specify the logic of the condition: the relationship between the item specified in the condition type text and the value entered to the right. The operators available in this list depend on the condition type text. Show me an example.
- Condition Value: Finish the condition by specifying a value. Depending on the operator you select in the operator text, you may see <empty>, a text box, or a text box and <empty>. Click <empty> (if necessary) and type a value in the text box(es). Click the Token button (right arrow) to use tokens. After you enter a value, you can click the value again to modify it. Show me an example.
Note: Only the condition types appropriate for the current condition will be available. For example, you cannot specify token conditions in starting rule conditions, since tokens only exist after a workflow has started.
Note: By selecting matches regular expression or does not match regular expression you can use pattern matching to specify a relationship.
Note: If you have selected to use a regular expression, type in a regular expression or click the pattern matching button to build a regular expression that will extract the desired information from the input. Learn more about the regular expressions I can use.
You can create as many conditions as you want by clicking Add condition.
Ordering conditions logically
There are two reasons you may want to pay attention to the order of your conditions:
- Logical Groups: Ordering conditions into groups determines how conditions will be evaluated logically and allows you to create nested and nuanced conditions. To create a new group of conditions, click Add Group. Show me some examples of how to use condition groups.
- Performance: The way you order conditions can improve your performance speed. Once a condition evaluates to false, the entire rule evaluates to false, going from top to bottom. If you place a condition that takes less time to evaluate at the top of the condition list, Workflow can skip the remaining conditions. The following table list the conditions from those that require the least time to evaluate to the most:
Condition Type Speed Entry Name Fast Entry Path Fast Parent Name Fast Entry Type Fast User Name Fast Entry Changes Fast Entry ID Fast Entry Server Fast Entry Repository Fast Field Conditions Medium Entry Parent ID Medium Volume Medium Template Conditions Medium Tag Conditions Medium Document Page Count Conditions Medium Template Name Medium Is Record Medium Folder Content Conditions Slow Parent Content Slow
Fast Laserfiche sends this information over with the notification from a LFS, so these do not require a call back to the repository for specific values. Medium These require a call to the LFS to retrieve the field values for that entry. Slow These require you to call the LFS and ask for specific values and require LFS to aggregate data for you to tell you how many documents are in the folder or check if there is a document in a folder with whatever condition you are looking for.
To optimize the speed at which your rules are evaluated, list the conditions that are the quickest to evaluate first. You should also order them from least likely to most likely to be satisfied. Show me an example.
To improve performance speed, conditions are also evaluated using short-circuit evaluation. As soon as the overall value of the condition can be determined, individual conditions will stop being evaluated. Show me an example.
Tip: To avoid logic mistakes and performance problems, you will often want to break complex starting rules into several simple rules.
How to order conditions
- To organize conditions into groups, click Add group. Ordering conditions into groups determines how conditions will be evaluated logically and allows you to create nested and nuanced conditions.
- To reorganize conditions and groups, drag and drop the item by clicking and dragging the item's green arrow.
- To delete a condition, right-click the condition and select Delete.
- Right-click a condition or group to cut, copy, paste, move, insert, add, and delete conditions. Inserting a condition creates the condition before the selected condition and adding a condition creates the condition after the selected condition.
Selecting entries for conditions
Some conditions require you to specify the entry that the condition will be associated with.
Note: You are not required to select entries for starting rule conditions.
Parent folder contents and folder contents conditions
The Parent Folder Contents and Folder Content conditions (and the recursive versions of these conditions) allow you to configure conditions that apply to an entry inside a folder.
Note: These conditions are only available to wait conditions and decision conditions, not starting rule conditions.
- Sub-Condition Editor: When you specify a value for these conditions a separate sub-condition editor will open so that you can specify conditions that will apply to a single entry within a folder. If the sub-condition editor specifies that any of the following conditions must be true or false, then, of all the entries in the folder, one must satisfy any one of the conditions. If the sub-condition editor specifies that all of the following conditions must be true or false, then, of all the entries in the folder, one must satisfy all the conditions. You can configure sub-condition editors the same way as regular condition editors.
- The Parent Folder: Contents (recursive) and Folder: Contents (recursive) conditions let you apply folder or parent folder conditions to subfolders. Show me an example. Learn about the Folder Condition Editor.
Tip: Type a description of your sub-condition (which will display in blue text in the regular condition editor) to help you remember the specifics of this condition.
Using tokens in conditions
Tokens are available to the right side of wait conditions and to both sides of decision conditions.
- You can use tokens on the left side of decision conditions by clicking the condition type text, pointing to Token, pointing to the activity that produced the token, and selecting a token. (Point to the workflow name to access global tokens.)
- Multi-value tokens on the left side will be treated like a multi-value field. Each value will be considered when evaluating the condition, and if any of the values meet the condition, the condition will be satisfied.
- You can use tokens on the right side of decision conditions and wait conditions by clicking the <empty> text and clicking the Token button (right arrow) .
- Multi-value tokens on the right side of a condition are treated the same as they are in most other text boxes in Workflow; the first value of the token will be used unless an index is specified.
Tokens on the left side of a condition
Example: Taylor places the multi-value Author token on the left side of a condition and specifies that the token must equal Bob. When the workflow runs, the token has three values: Susan, Bob, and John. The condition is satisfied because one of the token's values is Bob.
Tokens on the right side of a condition
The Stamp Name condition
The Stamp Name condition type lets you configure conditions based on the stamps that have been applied to a document. All the stamps on the document are compared to the condition value specified on the right-side of the equation. If any stamp name on the document equals, starts with, etc. the condition value text, than the condition will be met.
Example: The "Parking Permit 123" document has the following stamps on it: Approved, Confidential, and City Reviewed. The workflow should continue if the document has the Approved stamp on it. This condition: (Document: Stamp Names equals Approved), will check to see that Approved is one of the stamps on the document. In the case of "Parking Permit 123," this condition is met and the workflow will continue.
Example: The City of Pawnee has several approval stamps: "Approved by Leslie," "Approve It!! by Tom," and "MyApproval (Jerry)." Event permits are approved when any one of these stamps appears on the document. Using the "contains" operator, Workflow can check for the text "Approv" in any stamp name. The condition: (Document: Stamp Names contains Approv) will be met when any of the approval stamps listed below is added to a document.
Note: The Stamp Names condition only works for stamps that do not have tokens in their text. Learn more.
Limitations on conditions
- Entry Path conditions will only be evaluated if the folder the entry is in (the direct parent folder) changes. Changes to other folders in the entry's path will not cause the entry path condition to be evaluated. Show me an example.
- If you combine parent folder and folder conditions in the same wait condition and the starting entry is a folder, changes to the parent folder may not be evaluated. We recommend that you use one type of condition or the other.
- When a wait condition is satisfied, two tokens are produced that indicate who satisfied the condition (User Name and User SID). However, in the unlikely event that two users make changes to the entry within a short time period, the tokens will indicate the user who made the changes that caused the wait condition to be evaluated, not necessarily the user who made the changes that caused the wait condition to be satisfied. Show me an example.
- If a wait condition is satisfied the first time it is checked, no user is recorded for the %(WaitforEntryChange_Event User) and %(WaitforEntryChange_Event User SID) tokens.